package com.hsgene.order.domain.v1;

import com.hsgene.common.util.validation.FieldChecker;

import java.util.Date;

/**
 * 基因检测快递表
 *
 * @author wangbing
 * @version 1.0, 2018/9/18
 */
public class GeneticTestingExpressDelivery {

    /**
     * 逻辑主键
     */
    private String id;

    /**
     * 基因检测订单ID
     */
    private String orderId;

    /**
     * 用户地址ID
     */
    private String userAddressId;

    /**
     * 用户详细地址
     */
    private String detailAddress;

    /**
     * 寄送类型（0：纸质报告，1：发票，2：蜡块等字典表）
     */
    private String courierType;

    /**
     * 快递公司名称
     */
    private String courierCompanyName;

    /**
     * 快递公司ID
     */
    private String courierCompanyId;

    /**
     * 快递单号
     */
    private String courierNo;

    /**
     * 快递时间
     */
    private Date courierDateTime;

    /**
     * 签收日期
     */
    private Date signingDateTime;

    /**
     * 联系电话
     */
    private String phone;
    /**
     * j寄送人姓名
     */
    private String senderName;

    /**
     * 寄送状态enum(‘init’, ‘confirmed’)
     */
    private String status;

    /**
     * 内容说明
     */
    private String description;

    /**
     * 签收类型
     */
    private String signingType;

    /**
     * 拍照图片
     */
    private String imagesUrl;

    /**
     * 是否结束
     */
    private Integer isEnds;

    /**
     * 业务数据逻辑删除 0-代表未删除   1-代表删除
     */
    private Integer deleteFlag;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 类型（1：平台寄送材料给地服；2：地服寄送报告等给用户）
     */
    private Integer type;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getUserAddressId() {
        return userAddressId;
    }

    public void setUserAddressId(String userAddressId) {
        this.userAddressId = userAddressId;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public String getCourierType() {
        return courierType;
    }

    public void setCourierType(String courierType) {
        this.courierType = courierType;
    }

    public String getCourierCompanyId() {
        return courierCompanyId;
    }

    public void setCourierCompanyId(String courierCompanyId) {
        this.courierCompanyId = courierCompanyId;
    }

    public String getCourierNo() {
        return courierNo;
    }

    public void setCourierNo(String courierNo) {
        this.courierNo = courierNo;
    }

    public Date getCourierDateTime() {
        return courierDateTime;
    }

    public void setCourierDateTime(Date courierDateTime) {
        this.courierDateTime = courierDateTime;
    }

    public Date getSigningDateTime() {
        return signingDateTime;
    }

    public void setSigningDateTime(Date signingDateTime) {
        this.signingDateTime = signingDateTime;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSigningType() {
        return signingType;
    }

    public void setSigningType(String signingType) {
        this.signingType = signingType;
    }

    public String getImagesUrl() {
        return imagesUrl;
    }

    public void setImagesUrl(String imagesUrl) {
        this.imagesUrl = imagesUrl;
    }

    public Integer getIsEnds() {
        return isEnds;
    }

    public void setIsEnds(Integer isEnds) {
        this.isEnds = isEnds;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getCourierCompanyName() {
        return courierCompanyName;
    }

    public void setCourierCompanyName(String courierCompanyName) {
        this.courierCompanyName = courierCompanyName;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    /**
     * 字段校验
     */
    public void check(){

        FieldChecker.checkEmpty(this.courierCompanyName, "快递公司不能为空");
        if(!this.courierCompanyName.contains("人工")){
            FieldChecker.checkEmpty(this.courierNo, "快递单号不能为空");
        }else{
            FieldChecker.checkEmpty(this.senderName, "寄送人姓名不能为空");
            FieldChecker.checkEmpty(this.phone, "电话不能为空");
        }



    }


}
